<template>
  <div >

    <span style="padding-bottom: 100px">公共文档类别-
      <el-select v-model="form.region" class="m-2" placeholder="Select" size="large">
        <el-option label="会议资料" value="shanghai" />
        <el-option label="共享文本" value="beijing" />
      </el-select>
    </span>

    <span style="padding-bottom: 100px;float:right;">
      <el-select  class="m-2" placeholder="文件夹设置" size="large">
        <el-option label="会议资料" value="shanghai">
          <span>会议资料</span>
          <el-button
              style="float: right"
              type="primary"
              text
              link
          >修改</el-button>
        </el-option>
        <el-option label="共享文本" value="beijing" >
          <span>共享文本</span>
          <el-button
              style="float: right"
              type="primary"
              text
              link
          >修改</el-button>
        </el-option>
        <el-button
            style="padding-left: 45%"
            type="primary"
            text
            link
        >新建</el-button>
        <el-option
            v-for="item in options1"
            :key="item.value"
            :label="item.label"
            :value="item.value"
        />
      </el-select>
    </span>

    <div style="box-sizing: border-box;padding-top: 20px">
      <span>
        上传人
        <el-select v-model="value" class="m-2" placeholder="Select" size="large" style="width: 120px">
          <el-option v-for="f in files" :value="f.workerName" :label="f.workerName"/>
        </el-select>
        文档类型
        <el-select v-model="value2" class="m-2" placeholder="Select" size="large">
        <el-option
            v-for="item in options2"
            :key="item.value"
            :label="item.label"
            :value="item.value"
        />
        </el-select>
        主题关键字
        <el-select v-model="value3" class="m-2" placeholder="Select" size="large">
        <el-option
            v-for="item in options3"
            :key="item.value"
            :label="item.label"
            :value="item.value"
        />
        </el-select>
      </span>
    </div>
  </div>

  <div style="padding-top: 20px">
    上传科室
    <el-select v-model="value2" class="m-2" placeholder="Select" size="large" style="width: 120px">

      <el-option
          v-for="item in options2"
          :key="item.value"
          :label="item.label"
          :value="item.value"
      />
    </el-select>
    <span >上传时间</span>
    <el-date-picker
        v-model="form.date1"
        type="daterange"
        range-separator="To"
        start-placeholder="Start date"
        end-placeholder="End date"/>
    <el-button style="float: right;">重置</el-button>
    <el-button style="right:100px;float: right;">搜索</el-button>
  </div>



  <div style="padding-top: 10px">
    <!--p style="padding-left: 260px">文档信息</p -->

    <el-table
        title="文档信息"
        ref="multipleTableRef"
        :data="files"
        style="width: 100%"
        @selection-change="handleSelectionChange"
    >
      <el-table-column property="workerName" label="上传人" width="100" />
      <el-table-column property="department" label="上传科室" show-overflow-tooltip width="100"/>
      <el-table-column property="fileTitle" label="文档标题" width="150" />
      <el-table-column property="subjectKeywords" label="主题关键字" show-overflow-tooltip width="100"/>
      <el-table-column property="fileType" label="文件类型" width="100" />
      <el-table-column property="uploadDate" label="上传时间" width="230">
<!--        <template #default="scope">{{ scope.row.date }}</template>-->
      </el-table-column>
      <el-table-column property="name" label="操作" width="200" >

        <el-button
            type="primary"
            text
            link
        >查看</el-button>
        <el-button
            type="primary"
            text
            link
        >删除</el-button>
        <el-button
            type="primary"
            text
            link
        >移动</el-button>
        <el-button
            type="primary"
            text
            link
        >附件列表</el-button>

      </el-table-column>


    </el-table>



  </div>

</template>


<script>
import { ref } from 'vue'
import { ElTable } from 'element-plus'

export default {
  name: "PublicFile",
  data(){
    return{

      files:[],

      form:{
        name: '',
        region: '',
        date1: '',
        date2: '',
        delivery: false,
        type: [],
        resource: '',
        desc: '',
      },
    }
  },
  methods:{},
  created() {
    let that=this
    this.$axios.get("http://localhost:8080/file/listAll").then(function (res) {
      that.files=res.data
      console.log(res)
    })
  }

}
</script>


<style scoped>
.el-descriptions-item{
  height: 300px;
  weight:20px;
}
</style>